Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / docs / decisions / testing-consolidation-2026-03.md

Displaying Rendered • View rawDownload

docs/decisions/testing-consolidation-2026-03.md copilot/create-implementation-plan (228d872f) Text, 1.83 KB

<!--
• Copyright (c) 2026 Meshtastic LLC
-
• This program is free software: you can redistribute it and/or modify
• it under the terms of the GNU General Public License as published by
• the Free Software Foundation, either version 3 of the License, or
• (at your option) any later version.
-
• This program is distributed in the hope that it will be useful,
• but WITHOUT ANY WARRANTY; without even the implied warranty of
• MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
• GNU General Public License for more details.
-
• You should have received a copy of the GNU General Public License
• along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

Decision: Testing Consolidation — T383838core:testing Module

Date: 2026-03-11
Status: Implemented

Context

Each KMP module independently declared scattered test dependencies (T383838junit, T383838mockk, T383838coroutines-test, T383838turbine), leading to version drift and duplicated test doubles across modules.

Decision

Created T383838core:testing as a lightweight shared module for test doubles, fakes, and utilities. It depends only on T383838core:model and T383838core:repository (no heavy deps like T383838core:database). All modules declare T383838implementation(projects.core.testing) in T383838commonTest to get a unified test dependency set.

Consequences

Single source for test fakes (T383838FakeRadioController, T383838FakeNodeRepository, T383838TestDataFactory)
Clean dependency graph — T383838core:testing is lightweight; heavy modules depend on it in test scope, not vice versa
No production leakage — only declared in T383838commonTest, never in release artifacts
Reduced maintenance — updating test libraries touches one T383838build.gradle.kts

See core/testing/README.md for usage guide and API reference.

Served by rngit 1.5.0 - Generated in 0.04s